How to define a Record Template

The description of a Record Template is an XML document. The complete structure is:

Note: Please be aware that there are comments and instructions in the code below. These are included as: <!-- Comment / Instruction --> and may require that you add / repeat code.

<template maxrecord="number" setIRN="yes|no">
<tuple>
<atom name="colname"> <!-- Atomic value: add atomic values as required -->
text
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
<input type="text|integer|float" cols="number" rows="number" increment="number" mandatory="yes|no">
<prompt>
text
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
</prompt>
<help>
text
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
</help>
<value>
text
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
</value>
</input>
<records/>
<number/>
</atom>
<table name="colname"> <!-- Nested or double nested table - add tables as required -->
<tuple> <!-- nested table - repeatable -->
<atom>
<!-- Add code as for atom above -->
</atom>
</tuple>
<tuple> <!-- Double nested table - add as required-->
<table>
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
<tuple> <!-- Nested table - add as required-->
<atom>
<!-- Add code as for atom above -->
</atom>
</tuple>
</table>
</tuple>
<source name="colname" rows="rowlist" nestedrows="rowlist"/>
</table>
</tuple>
<report>
text
<column name="colname"/>
</report>/>
</template>

Although the XML may look complex, the main part is the specification of the fields that require values to be set. The format of the XML for this part is exactly the same as that generated by the Vitalware XML Export facility, which is the same as that used by the Vitalware XML Import tool. Using this same structure means a skeletal XML record can be generated by building a report with the required fields and producing an XML Export file. Once you have the skeletal XML it can be expanded to include any additional options required.

A quick summary of the XML structure used by the three kinds of fields in Vitalware may make things clearer. The three field kinds are: